<?php

use think\facade\Route;

Route::rule("/:version/apidemo", "/:version.apiDemo/test", "GET");

//发送短信
Route::rule("/smscode", "/sms/code", "POST");

//用户登录/退出
Route::rule("/login/phone", "/login/loginByPhoneSms", "POST");
Route::rule("/logout", "/logout/index", "GET");
Route::rule("/check/token", "/user/checkToken", "GET");

//用户信息
//Route::resource("user", "user");
Route::rule("/user/info", "/user/index", "GET");
Route::rule("/user/update", "/user/update", "POST");

/*************首页 API*******************/
//轮播图
Route::rule("/getRotationChart", "/goods/getRotationChart", "GET");
//导航菜单
Route::rule("/menus", "/category/menus", "GET");
//分类列表
Route::rule("/category/list", "/category/list", "GET");
//分类下商品
Route::rule("/category/goods", "/goods/getGoodsByCategoryId", "GET");

/*************商品详情*******************/
Route::rule("/goods/detail/:id", "/goods/detail", "GET");
Route::rule("/goods/content/:id", "/goods/getGoodsContent", "GET");

//购物车
//添加
Route::rule("/cart/add", "/cart/add", "POST");
//列表
Route::rule("/cart/list", "/cart/lists", "GET");
//删除
Route::rule("/cart/delete", "/cart/delete", "POST");
//清空
Route::rule("/cart/deleteall", "/cart/destoryAll", "POST");
//修改数量
Route::rule("/cart/update", "/cart/update", "POST");
//商品数量
Route::rule("/cart/count", "/cart/getCount", "get");
//全选/不选
Route::rule("/cart/selectAll", "/cart/selectAll", "get");
Route::rule("/cart/unSelectAll", "/cart/unSelectAll", "get");
//获取已选商品
Route::rule("/cart/selected", "/cart/getSlectedList", "GET");

//用户
//收获地址
Route::rule("/user/address/list", "/userAddress/lists", "GET");
//添加收获地址
Route::rule("/user/address/add", "/userAddress/add", "POST");
//修改地址
Route::rule("/user/address/update", "/userAddress/update", "POST");
//删除地址
Route::rule("/user/address/delete/:id", "/userAddress/delete", "get");
//设置默认地址
Route::rule("/user/address/default/:id", "/userAddress/setDefault", "get");

//地址
Route::rule("/address/province", "/address/getProvince", "GET");
Route::rule("/address/city/:id", "/address/getchildrens", "GET");
Route::rule("/address/district/:id", "/address/getchildrens", "GET");

//订单管理
Route::rule("/order/makeorder", "/order/makeOrder", "POST");
Route::rule("/order/detail/:id", "/order/detail", "GET");
Route::rule("/order/list", "/order/lists", "GET");

//支付回调
Route::rule("/pay_notify/weixin", "/notify/weixin", "GET");
Route::rule("/pay_notify/zhifubao", "/notify/aliPay", "GET");

Route::rule("/pay/weixin", "/pay/weixin", "POST");
Route::rule("/order/pay/status/:id", "/pay/getPayStatus", "GET");


//videos
Route::rule("/movie/hot", "/videos/getHot", "GET");
Route::rule("/movie/juji", "/videos/getJuji", "GET");
Route::rule("/movie/zongyi", "/videos/getZongyi", "GET");
Route::rule("/movie/playlist/:id", "/videos/getPlayList", "GET");
Route::rule("/movie/info/:id", "/videos/getInfo", "GET");

